package com.example.mybatis_plus_use.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * <p>
 *  订单表 Entity
 * </p>
 *
 * @author zjh
 * @since 2025-01-07
 */
@Getter
@Setter
@TableName("orders")
public class Orders extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 订单ID
     */
    @Schema(description = "订单ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单编号
     */
    @Schema(description = "订单编号")
    @TableField("order_no")
    private String orderNo;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    @TableField("user_id")
    private Integer userId;

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
